package QuizPackage;
import javax.servlet.http.HttpServletRequest;


public abstract class Question {

	public int questionID;
	
	/**
	 * Constructor.
	 * @param ID ID Unique ID identifying this Question.  Allows it to specify
	 * the parameter related to this Question in the HTML formatting.
	 */
	public Question(int ID)
	{
		questionID = ID;
	}
	
	/**
	 * Gets a string of HTML for this Question.  This HTML includes the
	 * Question text and the input for the Question (specific to
	 * this question ID).  Does NOT return a form.
	 */
	public abstract String getHTML();
	
	/**
	 * Returns the number of points the given answer
	 * (contained in params) gets for the question.
	 * Method should be called as
	 * int score = checkAnswer(request.getParameterValues(ID))
	 */
	public abstract int checkAnswer(String[] params);
	
	/**
	 * Returns the total number of points possible for this question.
	 */
	public abstract int totalPoints();
	
	/**
	 * Returns a String describing the correct answer for this question.
	 */
	public abstract String correctAnswer();
	
	/*public boolean checkAnswer(String param)
	{
		String[] params = new String[1];
		params[0]=param;
		return checkAnswer(params);
	}*/
	
	
}
